﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace YYTmEditer.MtObject
{
	public class ClassInfo {
		public string className;
		public int classLevel;

		public string Name(){
			Dictionary<string, string> namemap = new Dictionary<string, string>();
			namemap.Add("4fe56363-b1d9-46b7-9a09-bd2df1a5329f", "影主");
			namemap.Add("c595c344-d323-4cf1-9ad6-41edc2aebbd0", "狱魔");
			namemap.Add("fd119fcf-c2cf-469e-8a5a-e9b0f265560d", "觉者");
			namemap.Add("9317cf9a-04ec-49da-be29-0e4ed61eb8ba", "海妖");
			namemap.Add("fda62ada-520e-42f3-aa88-e4a78549c4a2", "烛人");
			if (string.IsNullOrEmpty(className)) {
				MessageBox.Show("游戏未开始,请先开始一局新的游戏,建立存档");
				Application.Current.Shutdown();
			}
			return namemap.ContainsKey(className) ?namemap[className]:"?";	
		}
	}
 //   	"startingConditions": {
	//	"seed": 904183419,
	//	"isBattleMode": false,
	//	"isFtueRun": false,
	//	"battleModeStartTime": "",
	//	"battleWarmup": 0,
	//	"version": "9400",
	//	"mainClassInfo": {
	//		"className": "4fe56363-b1d9-46b7-9a09-bd2df1a5329f",
	//		"classLevel": 10
	//	},
	//	"subclassInfo": {
	//		"className": "c595c344-d323-4cf1-9ad6-41edc2aebbd0",
	//		"classLevel": 10
	//	},
	//	"ascensionLevel": 12,
	//	"covenants": [
	//		"a498b6c7-a094-48c4-8f99-8e3a2d2cc35b",
	//		"0dd4f35c-010e-4455-bd7a-7d801d128027",
	//		"cd0cccc6-70d7-4012-8bd4-72f32ee0a444",
	//		"ac6a3426-b233-44b7-a221-7eedd7a5b046",
	//		"e13fa3da-6dc0-40a3-942a-1f4c1863a9e4",
	//		"2d48cc06-c584-4f1a-be83-06831591fe29",
	//		"10247c18-57e3-40f2-89ac-2048c7b2dfc9",
	//		"5d03474a-10e7-46db-abc1-90b5e53f400a",
	//		"19305ab8-a44b-45a9-926f-1ee70912d7d1",
	//		"bd5841ce-ead5-4d95-ba0c-a4a220b6d245",
	//		"d639494a-9557-481a-91b7-d5f3822628da",
	//		"21c51e96-3281-4949-a6f6-72d7d189c232"
	//	],
	//	"mutators": []
	//},
    public class StartCondition
    {
		public long seed;
		public bool isBattleMode;
		public bool isFtueRun;
		public ClassInfo mainClassInfo;
		public ClassInfo subclassInfo;
		public int ascensionLevel;
		public List<string> covenants;
		public List<string> mutators;
		public int battleWarmup;
		public string version;
		public string battleModeStartTime;

		public string Info() {
			return "主:"+mainClassInfo.Name() +".副:"+ subclassInfo.Name();
		}
	}
}
